package com.guigu.tms.commons.aggregation.feign;

import com.guigu.tms.commons.aggregation.entity.DriverJob;
import com.guigu.tms.commons.aggregation.entity.TaskTransport;
import com.guigu.tms.commons.aggregation.entity.TruckDriver;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

@FeignClient(value = "tms-aggregation",path = "/aggregation/truckDriver",contextId ="a1" )
public interface DriverFeign {

    @PostMapping("/ShowTruckDriver")
    List<DriverJob> ShowDriverJob(@RequestBody Map<String,String> map);

    @PostMapping("/UploadJf")
    int UploadJf(@RequestParam String jobId,@RequestParam String taskId,@RequestParam String deliverPicture,@RequestParam String transportCertificate);

    @PostMapping("/UploadTh")
    int UploadTh(@RequestParam String jobId,@RequestParam String taskId,@RequestParam String cargoPickUpPicture);

    @GetMapping("/CreateTaskPickupDispatch")
    //根据车次id(tripsId)去查询订单分类ID，拿到订单分类ID去查订单ID
    //拿到运输任务目的地机构ID 去判断订单分类中的目的地机构id是否一致 一样生成派件任务,否则不生成派件任务
    int CreateTaskPickupDispatch(@RequestParam String tripsId,@RequestParam(value = "endId", required = true) String endId);
}
